#pragma once
#include "define.h"

enum ENTRY_TYPE{ exact , lower_bound, upper_bound}; 

typedef struct HASHITEM{
	long long checksum;	// or long long might be even better
	ENTRY_TYPE  entry_type;
	short depth;
	short eval;
}HashItem;

extern void CalculateInitHashKey(int CurPosition[10][9]);
extern void Hash_MakeMove(CHESSMOVE* move,int CurPosition[10][9]);
extern void Hash_UnMakeMove(CHESSMOVE* move,int nChessID,int CurPosition[10][9]);

extern int LookUpHashTable(int alpha, int beta, int depth,int TableNo);
extern void EnterHashTable(ENTRY_TYPE entry_type, short eval, short depth,int TableNo);

extern unsigned int m_nHashKey32[15][10][9];
extern unsigned long long m_ulHashKey64[15][10][9];
extern HashItem *m_pTT[10];
extern void InitializeHashKey();
extern unsigned int m_HashKey32;
extern long long m_HashKey64;